package org.example.controller.SpringBoot300.ut;

import org.example.util.file.FileUtil;
import org.example.util.log.Logac;

import java.io.File;
import java.io.IOException;
import java.util.List;

/**
 * @auther admin闫
 * @Descriptopn 检测出来的视频有多少，有哪些没有批量搞好视频并记录
 * @date 2024/4/11 17:10
 */
public class DYJianCMove {

    public static void main(String[] args) {
        String path="H:\\短视频工作目录\\302成品";
        List<String> xiaYiPath = FileUtil.getXiaYiPath("H:\\短视频工作目录\\mudidir");
        for (String s : xiaYiPath) {
            List<String> xiaYiPath1 = FileUtil.getXiaYiPath(s);
            for (String s1 : xiaYiPath1) {
                List<String> xiaYiPath2 = FileUtil.getXiaYiPath(s1);
                for (String s2 : xiaYiPath2) {
                    String fileName = FileUtil.getFileName(s2);
                    String tupath=path+"\\"+fileName+".mp4";
                    if (FileUtil.isFileExists(tupath)){
                        File file=new File(s2);
                        File parentFile = file.getParentFile();
                        System.out.println(parentFile.toString());
                        FileUtil.moveFile(tupath,parentFile.toString());
                    }else {
                        Logac.log(s2+"不存在！");
                    }

                }
            }
        }
    }

}

